package com.magus.project.yddemo.entity;

import javax.persistence.Column;
import javax.persistence.ConstraintMode;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.magus.framework.core.entity.BaseEntity;
import com.magus.sis.common.entity.ComMajor;

/**
 * 指标
 * 
 * @author Zhang JiaWei
 * @date 2018-01-18 15:14
 */
@Entity
@Table(name = "YDDEMO_INDICATOR")
public class Indicator extends BaseEntity {

	/**   */
	private static final long serialVersionUID = 1L;

	@Column(name = "NAME_", length = 30)
	private String name;

	@Column(name = "CODE_", length = 30)
	private String code;

	@Column(name = "UNIT_", length = 20)
	private String unit;

	/**
	 * 维度（day,month,year）
	 */
	@Column(name = "DIMENSION_", length = 20)
	private String dimension;

	@ManyToOne
	@JoinColumn(name = "GROUP_ID_", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
	private IndicatorGroup group;
	/**
	 * 专业
	 */
	@ManyToOne
	@JoinColumn(name = "MAJOR_ID_", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
	private ComMajor major;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getDimension() {
		return dimension;
	}

	public void setDimension(String dimension) {
		this.dimension = dimension;
	}

	public IndicatorGroup getGroup() {
		return group;
	}

	public void setGroup(IndicatorGroup group) {
		this.group = group;
	}

	public ComMajor getMajor() {
		return major;
	}

	public void setMajor(ComMajor major) {
		this.major = major;
	}

}
